package com.db.stockexchange.common.messages.server;

import com.db.stockexchange.common.OrderSide;
import com.db.stockexchange.common.OrderStatus;
import com.db.stockexchange.common.messages.MessageType;

public class ExecutionReportMessage extends ServerMessage {
	private int orderID;
	private String symbol;
	private OrderSide side;
	private OrderStatus orderStatus;
	
	protected ExecutionReportMessage(String senderCompID,
			int orderID, String symbol, OrderSide side, OrderStatus orderStatus) {
		super(MessageType.EXEC_REPORT, senderCompID);
		this.orderID = orderID;
		this.symbol = symbol;
		this.side = side;
		this.orderStatus = orderStatus;
	}

	public int getOrderID() {
		return orderID;
	}

	public String getSymbol() {
		return symbol;
	}

	public OrderSide getSide() {
		return side;
	}

	public OrderStatus getOrderStatus() {
		return orderStatus;
	}
	
	@Override
	public String toString() {
		return new StringBuilder().append(super.toString()).append(", ")
				.append(orderID).append(", ")
				.append(symbol).append(", ")
				.append(side).append(", ")
				.append(orderStatus).toString();
	}
}
